Skip to content

docs: improve examples for tool calling and cron usage (#26)#28

Closed
evilroc-pixel wants to merge 1 commit intoopenclaw:mainfrom
evilroc-pixel:doc/improve-examples-20260309-084534
Closed

docs: improve examples for tool calling and cron usage (#26)#28
evilroc-pixel wants to merge 1 commit intoopenclaw:mainfrom
evilroc-pixel:doc/improve-examples-20260309-084534

Conversation

@evilroc-pixel
Copy link
Copy Markdown

This PR adds a comprehensive real-world example that demonstrates how to mix shell commands with Lobster tools (openclaw.invoke), pass data via stdin, and use from OpenClaw cron.

Changes

  • Adds examples/daily-standup.lobster workflow showing:
    • Jira ticket fetching via jira CLI
    • LLM summarization via llm-task tool
    • Safe arg handling with env vars
    • stdin piping between steps
  • Expands README with a new "Real-world example" section
  • Includes instructions for standalone execution and cron integration

This addresses the confusion reported in #26 where users struggled to compose shell steps with Lobster tools, especially when invoked from OpenClaw.

Fixes #26.

Checklist

  • Documentation only (no code changes)
  • README updated with runnable example
  • Example file added under examples/
  • Example tested manually (simulated)
  • PR description clear and links issue

- Adds examples/daily-standup.lobster showing mixed shell + openclaw.invoke
- Improves README with real-world example section
- Demonstrates stdin piping, safe arg handling, and cron usage
- Addresses confusion reported in openclaw#26

Closes openclaw#26
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f8960b4e2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- id: list-tickets
command: >
jira issues search "project=${project} AND status=Todo" --json |
jq -s '[.[] | {id: .key, title: .fields.summary, status: .fields.status.name, priority: .fields.priority.name, assignee: (.fields.assignee.displayName // "unassigned")] | .[0:env.LOBSTER_ARG_limit | tonumber]' 2>/dev/null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix malformed jq filter in list-tickets step

The jq program in this step has a bracket mismatch (] where the object should close with }), so jq fails to compile and the workflow cannot produce ticket JSON. Because stderr is redirected to /dev/null, this failure is also hard to diagnose for users trying the example, making the new documented pipeline non-runnable as written.

Useful? React with 👍 / 👎.


- id: summarize
command: >
openclaw.invoke --tool llm-task --action json --args-json '{"prompt": "${llm_prompt}"}'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Escape llm_prompt before embedding it in --args-json

This command injects ${llm_prompt} directly into a JSON literal inside shell quotes, but README already documents this substitution as raw text replacement. Any prompt containing quotes (or apostrophes) will produce invalid JSON or broken shell quoting, causing openclaw.invoke to fail for common real inputs.

Useful? React with 👍 / 👎.

@happyclaw-agent

This comment was marked as spam.

@mbelinky
Copy link
Copy Markdown
Contributor

mbelinky commented Apr 6, 2026

Thanks for the docs work here.

We’re narrowing scope for the next Lobster npm release and not taking overlapping docs/example rewrites right before publish. There are multiple competing PRs covering the same README/examples lane, so we’re going to close this set and do one consolidated docs pass after the release instead of merging overlapping versions piecemeal.

I’m leaving the underlying docs need tracked separately, and we can revisit the best pieces from this after the publish.

@mbelinky mbelinky closed this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc request: Need better examples for tool calling and llm_task in the middle

3 participants